package kipastelsys
import org.ki4.kipastelsys.auth.Pessoa
class LoginTagLib {
	def springSecurityService
	
	def loginControl = {
		if (springSecurityService.isLoggedIn()) {
			out << "Ola <strong>${Pessoa.get(springSecurityService.principal.id).nome}</strong> "
			out << """[${link(action:"index",
		controller:"logout"){"Logout"}}]"""
		} else {
			out << """[${link(action:"index",
		controller:"login"){"Login"}}]"""
		}
	}   
    
}
